package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Collect;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CollectMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Collect record);

    Collect selectByPrimaryKey(Long id);

    List<Collect> selectAll();

    int updateByPrimaryKey(Collect record);

    Collect selectByIdAndType(@Param("userId") Long userId,@Param("collectId") Long collectId, @Param("type") int type);

    void deleteByUserIdAndType(@Param("userId") Long userId, @Param("collectId") Long collectId,@Param("type") int type);

    void saveByUserIdAndType(@Param("userId") Long userId, @Param("collectId") Long collectId,@Param("type") int type);

    int count(@Param("collectId") Long collectId, @Param("type") int type);
}